package com.py.credit.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.py.credit.common.rest.RestServiceResult;
import com.py.credit.entity.Database;
import com.py.credit.service.DbService;
import com.py.framework.core.annotation.IgnoreAuthority;

@RestController
@RequestMapping(value = "/db")
public class DbController {

	@Autowired
	private DbService dbService;

	@IgnoreAuthority
	@RequestMapping(value = "/getDbList.json")
	public RestServiceResult<List<Database>> getDbList() {

		return new RestServiceResult<List<Database>>(dbService.getDbList(null));

	}

}
